// 工厂模式：工厂函数
function createPerson(name, age, height, address) {
  var p = {};
  p.name = name;
  p.age = age;
  p.height = height;
  p.address = address;

  p.eating = function () {
    console.log(this.name + "在吃东西~");
  };

  return p;
}

var p1 = createPerson("张三", 18, 1.88, "石家庄市");
var p2 = createPerson("李四", 18, 1.88, "上海市");
var p3 = createPerson("王五", 18, 1.88, "北京市");

// 工厂模式的确定（获取不到对象最真实的类型）
